﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace CardMonitor.Utils
{
    [ValueConversion(typeof(string), typeof(string))]
    class BusiTypeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            String saleType = (String)value;
            if ("0".Equals(saleType))
            {
                return "销售业务";
            }
            else if ("1".Equals(saleType))
            {
                return "采购业务";
            }else
            {
                return null; 
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return "";
        }
    }
}
